#include<bits/stdc++.h>
using namespace std;

class Solution {
public:
    double largestTriangleArea(vector<vector<int>>& points) {
        vector<pair<int, int>> vecs;
        double ans = 0;
        for(int i = 0; i < points.size(); i++){
            for(int j = i + 1; j < points.size(); j++){
                for(int k = j + 1; k < points.size(); k++){
                    double x1 = points[i][0] - points[j][0];
                    double y1 = points[i][1] - points[j][1];
                    double x2 = points[k][0] - points[j][0];
                    double y2 = points[k][1] - points[j][1];
                    ans = max(ans, abs(x1 * y2 - x2 * y1) / 2.0);
                }
            }
        }
        return ans;
    }
};

/**
 * @brief 2022.5.16
 * 叉积做法，记得两条向量要相邻才能计算。
 */